﻿<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%
String base = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+base+"/";
String message = (String)request.getAttribute("Message");
%>
<Html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<jsp:include page="../public/publicJs.jsp" flush="false"></jsp:include>
<script language="JavaScript" src="<%=base%>/js/js_menuConfig.js"></script>
<script language=javascript>
  var root_path="/crm";
  var path=location.href.substring(0,location.href.lastIndexOf("/")+1);
  var formPath = path.substring(0,path.indexOf("/app")); 
  var appPath="<%=base%>";
  var IsDBAdmin="";
  //临时记录页签位置
  var reportTabNumber=null;  
  var g_UserLanguage="0";  
  function form_submit(){
    document.getElementById("myLoad").innerHTML = "<img src='<%=basePath%>images/loading.gif' alt='数据保存中' class='icon1' border='0' align='absmiddle'/> 数据保存中,请稍后......";
    fn_addViewTurn();
  }
</script>
<style>.com_button{font-size:12px}</style>
</head>
<body>
<form method="post" action="<%=basePath%>menu.crm?method=saveAll" name="menuConfigForm">
<input name="ViewTurn" type="hidden" value=""/>
<input name="firstMenuItem" type="hidden" value=""/>
<center><br/>
<div align="center">
<table style="margin-top:12px;" class="title_top"
	width=600 align=center cellspacing=0 border="0" cellspacing="0"
	cellpadding="0">
	<tr valign="top" class="tree_title_txt">
		<td class="tree_title_txt" width=100% height=26 align=center valign="middle">菜单设置</td>
	</tr>
	<tr valign="top">
		<td id="app_area" style="padding:6px" width=100% align=center>
			<fieldset style="width:95%;TEXT-ALIGN:center;"> 
  			<legend>菜单设置</legend>
			<table  align=center width="98%" border="0" cellspacing="0" cellpadding="0">
			 <tr valign="top">
				<td style="padding:6px" align=center width="80%">
				<select class="borderstyle_1"
					name="ViewList" multiple style="height:270px; width:414px;"
					ondblclick="fn_editProcess()"
					onkeydown="if(event.keyCode==46)fn_deleteProcess() ;"
					onchange="fn_showMenuTitle()" style="font-size:13px" size=10>					
				</select>
				
				<script language="javascript">
				  	fn_getMenuList();
		    	</script>
				<div align=left style="color:#808080;margin-top:6px;margin-left:3px">当前样式:&nbsp;
				<span id=menuTitle></span></div> 
				</td>
				<td style="padding:12px;padding-right:24px;padding-top:3px;" algin=center width="20%">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><input
							type="button" onclick="fn_newProcess()" value="新建"
							class=btn3_mouseout onmouseover="this.className='btn3_mouseover'"
							onmouseout="this.className='btn3_mouseout'">
						</td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><input
							type="button" onclick="fn_deleteProcess()" value="删除"
							class=btn3_mouseout onmouseover="this.className='btn3_mouseover'"
							onmouseout="this.className='btn3_mouseout'"></td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><input
							type="button" onclick="fn_editProcess()" value="编辑"
							class=btn3_mouseout onmouseover="this.className='btn3_mouseover'"
							onmouseout="this.className='btn3_mouseout'"></td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><input
							type="button" onclick="fn_copyProcess()" value="复制"
							class=btn3_mouseout onmouseover="this.className='btn3_mouseover'"
							onmouseout="this.className='btn3_mouseout'"></td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><input
							type="button" onclick="fn_setFirstItem()" value="首选项"
							class=btn3_mouseout onmouseover="this.className='btn3_mouseover'"
							onmouseout="this.className='btn3_mouseout'"></td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><input
							type="button" onclick="fn_activeItem()" value="隐藏菜单"
							id="btn_active" class=btn3_mouseout
							onmouseover="this.className='btn3_mouseover'"
							onmouseout="this.className='btn3_mouseout'"></td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="bottom">顺序</td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><img
							src="<%=basePath%>images/action_up.gif" width="19" height="19"
							class="Info_icon" alt="上移" onclick="OptionMove(-1)">&nbsp;&nbsp;<img
							src="<%=basePath%>images/action_down.gif?OpenImageResource"
							width="19" height="19" class="Info_icon" alt="下移"
							onclick="OptionMove(1)"></td>
					</tr>

					<tr valign="top">
						<td height=30 align=center width="100%" valign="middle"><img
							src="<%=basePath%>images/action_addAlll.gif" width="19"
							height="19" alt="右移" class="Info_icon" alt="上移"
							onclick="OptionMoveLayer(1)">&nbsp;&nbsp;<img
							src="<%=basePath%>images/action_delAll.gif" width="19"
							height="19" alt="左移" class="Info_icon" alt="下移"
							onclick="OptionMoveLayer(-1)"></td>
					</tr>
				</table> 
				</td>
			</tr>
			<tr valign="top">
				<td style="padding:4px,12px;padding-top:-6px;" width="100%"
					colspan="2" class="note_txt">*描述<br>
				1 可以设置菜单隐藏显示 <br>
				2 可以设置菜单为二级菜单<br>
				3 可以复制菜单</td>
			</tr>
		</table>
	</fieldset>		
	</td>
	</tr>
	<tr valign="top">
		<td width="100%">
		<table width=100% align=left border="0" cellspacing="0" cellpadding="0">
			<tr valign="top">
				<td style="padding-left:23" width="70%" valign="left">
					<div id="myLoad" style="text-align:left"></div>
					<%
						if(message != null && message.trim().length()>0){
					%>
							<script type="text/javascript">
								document.getElementById("myLoad").innerHTML = "<img src='<%=basePath%>images/info.gif' alt='数据保存信息 ' class='icon1'  border='0' align='absmiddle'/> <%=message%>";
							</script>
					<%	
						} 
					%>
				</td>
				<td style="padding-left:6" width="30%" valign="middle">
				<div align="right">
				<table border="0" cellspacing="0" cellpadding="0"
					style="margin:12px">
					<tr valign="middle">
						<td><input type=submit name="submit"
							onmousedown="form_submit()" class="btn3_mouseout"
							style="margin-right:12px" align=center valign=middle value="保存">
						<input type=button onclick="parent.location.reload()" class="btn3_mouseout" style="margin-right:12px"
							align=center valign=middle value="刷新"></td>
					</tr>
				</table>
				</div>
				<div align="right"></div>
				</td>
			</tr>
		</table>
		</td>
	</tr> 
</table>
</div>
</center>
</form>
</body>
</html>